package com.jialin.action;

import javax.annotation.Resource;
import com.jialin.entity.User;
import com.jialin.service.IUserManage;
import com.jialin.entity.HouseInfo;
import com.jialin.service.IInfoManage;
import com.opensymphony.xwork2.ActionSupport;

public class InfoAction extends ActionSupport {
	
	private User user;
	private HouseInfo info;

	@Resource  
	private IUserManage userManage;
	
	public HouseInfo getInfo() {
		return info;
	}

	public void setInfo(HouseInfo info) {
		this.info = info;
	}

	public IInfoManage getInfoManage() {
		return infoManage;
	}

	public void setInfoManage(IInfoManage infoManage) {
		this.infoManage = infoManage;
	}

	@Resource  
	private IInfoManage infoManage;

	public void setUserManage(IUserManage userManage) {
		this.userManage = userManage;
	}
	
	public IUserManage getUserManage() {
		return userManage;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public String addInfo(){
		
		infoManage.addInfo(info);
		return "success";
	}
	
	public String modifyInfo(){
		infoManage.modifyInfo(info);
		return "success";
	}
	
	public String deleteInfo(){
		infoManage.deleteInfo(info);
		return "success";
	}
	
	public String getInfos(){
		return infoManage.getInfos();
	}
	
}
